package com.example.fangwei.utilsapp.textview;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

import com.example.fangwei.utilsapp.R;
import com.fangwei.utilsLibrary.customerview.textview.AutoVerticalScrollTextView;

import java.util.ArrayList;
import java.util.List;

public class AutoScrollTextViewActivity extends AppCompatActivity {

    private AutoVerticalScrollTextView verticalScrollTextView;
    private TextView horizontalTextView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_auto_scroll_text_view);

        initView();
    }

    private void initView() {
        List<String> list = new ArrayList<>();
        list.add("这是可以上下滚动的textView1");
        list.add("这是可以上下滚动的textView2");
        list.add("这是可以上下滚动的textView3");
        verticalScrollTextView = ((AutoVerticalScrollTextView) findViewById(R.id.verticalScrollTextView));
        verticalScrollTextView.setData(list);

        horizontalTextView = ((TextView) findViewById(R.id.horizontalScrollTextView));
        horizontalTextView.setSelected(true);
    }
}
